package com.scn.base.dao.impl;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.scn.base.dao.SysLogDao;
import com.scn.base.domain.SysLogVO;
import com.scn.base.page.PageVO;

public class SysLogDaoImpl extends SqlMapClientDaoSupport implements SysLogDao{
	public void insertSysLog(SysLogVO syslog) {
		getSqlMapClientTemplate().insert("insertSysLog",syslog);
	}
	public int selectSysLogCount(Map<String, String> param) {
		return (Integer)getSqlMapClientTemplate().queryForObject("selectSysLogCount",param);
	}
	public List<SysLogVO> selectSysLogList(Map<String, String> param,PageVO page) {
		List<SysLogVO> list = new ArrayList<SysLogVO>();
		list = getSqlMapClientTemplate().queryForList("selectSysLogList",param,(page.getCurPage()-1)*page.getPageSize(), page.getPageSize());
		if(list != null && list.size() > 0){
			return list;
		}else{
		    return null;
		}
	}

}
